package com.macro.mall.product.service;


import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.macro.mall.model.PmProdSpec;
import com.macro.mall.model.PmProdSpecDetail;
import com.macro.mall.model.PmPrpty;
import com.macro.mall.product.dto.AppProdSpecDto;
import com.macro.mall.product.dto.PmProdSpecDetailDto;
import com.macro.mall.product.dto.PmProdSpecDto;
import com.macro.mall.product.dto.PmProdSpecSaveDto;

import java.util.List;
import java.util.Map;


public interface PmProdSpecService {
    List<PmProdSpec> list(PmProdSpecDto serverSpecDto);
    List<PmProdSpec> listPage(int pageNum, int pageSize, PmProdSpecDto serverSpecDto);
    List<PmProdSpecDto> converDataList(List<PmProdSpec> prodSpecList);

    int save(PmProdSpecSaveDto prodSpecDto);
    int delete(String prodSpecIds);

    PmProdSpec getById(Long id);

    AppProdSpecDto getByIdApp(Long id);

    PmProdSpecDto converDataInfo(PmProdSpec pmProdSpec);

    List<PmProdSpec> listPageApp(int pageNum, int pageSize, Map<String,String> searchMap);
    List<PmPrpty> getSpecPrptyBySelective(String packageId, Long prodSpecId);
    List<Map<String,Object>> getSpecChannelBySelective(JSONArray salePrptyArray,JSONArray naturePrptyArray, String prodSpecType, Long prodSpecId);

    void sortSpecChannel(List<Map<String,Object>> resultList,String latitude,String longitude);

    JSONObject getProdSpecSkuListShow(Long prodSpecId, Long packageId);

    PmProdSpecDetailDto getSpecDetailDtoBySpecId(Long prodSpecId );
    PmProdSpecDetail getSpecDetailBySpecId(Long prodSpecId);

    //获取上门服务可选服务库存
    List<Map<String, Object>> getSpecChannelByDoor(JSONArray salePrptyArray, JSONArray naturePrptyArray, String prodSpecType, Long prodSpecId,String provCode,String cityCode,String countyCode,String today,String endDay);

    void converDataSku(PmProdSpecDto prodSpecDto);
}
